package com.cmc.cloud.cmclink.doc.api.document.req.si;

import com.cmc.cloud.cmclink.doc.api.document.req.AttachmentUpdateReqDto;
import com.cmc.cloud.cmclink.doc.api.document.req.RequirementsUpdateReqDto;
import com.cmc.cloud.cmclink.doc.api.document.req.so.SoForecastBaseVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.util.Date;
import java.util.List;

import static com.cmes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * @author 周贤
 * @date 2025/7/28
 */
@Schema(description = "管理后台 - 提单可合并 Request VO")
@Data
@EqualsAndHashCode()
@AllArgsConstructor
@NoArgsConstructor
@ToString(callSuper = true)
public class BlnoCombineListDto {
    @Schema(description = "主键 有主键就更新 没有主键就创建", requiredMode = Schema.RequiredMode.REQUIRED, example = "29756")
    private Long id;

    @Schema(description = "订舱号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String bookingNo;

    @Schema(description = "so主表id", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long soId;

    @Schema(description = "提单号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String blNo;

    @Schema(description = "客户业务号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String referenceNo;

    @Schema(description = "始发港提单状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1",
            allowableValues = {"SI01(草稿)", "SI02(SI 待审核)", "SI03(SI已确认)", "SI04(待确认 Draft 件)", "SI05(已确认 Draft 件)", "SI06(提单准备好签发)"})
    private String siStatus;

    @Schema(description = "提单拆并单类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private String splitCombineType;

    @Schema(description = "路径id", requiredMode = Schema.RequiredMode.REQUIRED, example = "20782")
    private Long routeId;

    @Schema(description = "接货地", requiredMode = Schema.RequiredMode.REQUIRED)
    private String porCode;

    @Schema(description = "装货港", requiredMode = Schema.RequiredMode.REQUIRED)
    private String polCode;

    @Schema(description = "卸货港", requiredMode = Schema.RequiredMode.REQUIRED)
    private String podCode;

    @Schema(description = "目的地", requiredMode = Schema.RequiredMode.REQUIRED)
    private String delCode;

    @Schema(description = "接货地名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String porDesc;

    @Schema(description = "装货港名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String polDesc;

    @Schema(description = "卸货港名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String podDesc;

    @Schema(description = "目的地名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String delDesc;

    @Schema(description = "订舱人代码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String bkpCode;

    @Schema(description = "订舱船名", requiredMode = Schema.RequiredMode.REQUIRED)
    private String bkgVesselCode;

    @Schema(description = "订舱航次", requiredMode = Schema.RequiredMode.REQUIRED)
    private String bkgVoyage;

    @Schema(description = "舱位代码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String spaceOwner;

    @Schema(description = "箱主代码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String cntrOwner;

    @Schema(description = "箱状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private String cntrStatus;

    @Schema(description = "协议号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String agreementNo;

    @Schema(description = "运输条款", requiredMode = Schema.RequiredMode.REQUIRED)
    private String shippingTerm;

    @Schema(description = "一代代码")
    private String topAgentCode;

    @Schema(description = "提单主体代码")
    private String blEntity;

    @Schema(description = "提单类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private String blType;

    @Schema(description = "提单打印地")
    private String issuePlace;

    @Schema(description = "签单日期")
    private LocalDate issueDate;

    @Schema(description = "签发小船提单")
    private Boolean issueFeederBl;

    @Schema(description = "签发小船装港")
    private Boolean issueFeederPlace;

    @Schema(description = "客户要求签单类型", requiredMode = Schema.RequiredMode.REQUIRED)
    private String signOrder;

    @Schema(description = "实际签单类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private String signType;

    @Schema(description = "锁单标识")
    private Boolean blLockFlag;

    @Schema(description = "D/O状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private String doStatus;

    @Schema(description = "数据来源")
    private String datasource;

    @Schema(description = "si通知邮箱 （收，可多）")
    private String siNotifyEmails;

    @Schema(description = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
    private String creator;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "更新时间")
    private Date updateTime;

    @Schema(description = "提单航线船期信息")
    private List<BlnoVslvoyUpdateReqDto> blnoVslvoys;

    @Schema(description = "Liner航线航次信息")
    private BlnoVslvoyUpdateReqDto linerVsloy;

    @Schema(description = "提单货物信息")
    private List<BlnoCargoUpdateReqDto> blnoCargos;

    @Schema(description = "提单箱信息")
    private List<BlnoCntrUpdateReqDto> blnoCntrs;

    @Schema(description = "提单指定支付方式信息")
    private List<BlnoPaymentUpdateReqDto> blnoPayments;

    @Schema(description = "订舱特殊要求")
    private List<RequirementsUpdateReqDto> reqVOList;

    @Schema(description = "提单附件信息")
    private List<AttachmentUpdateReqDto> attachmentReqVO;

    @Schema(description = "提单收发通信息")
    private List<BlnoScnUpdateReqDto> blnoScns;

    @Schema(description = "预配箱数据")
    private List<SoForecastBaseVO> soForecastList;

}
